<section id="reward" class="temp">
	<!--页头{{-->
	<header class="header">
		<a class="return" href="index/a.html" dir="back">返回</a>
		<h2>开奖公告</h2>
	</header>
	<!--页头}}-->
	<div class="loading"><img src="http://a.tbcdn.cn/mw/base/styles/component/more/images/loading.gif" width="30" height="12" /></div>
	<div id="rewardMain" class="appMenu">
		<ul></ul>
	</div>
</section>

<script type="javascript/template" id="rewardDataTemp">
	<% 
		var lotname = '' , lot = '';
		for(var i in C.Config.lotTypeNumberId){
			if(lotteryType == C.Config.lotTypeNumberId[i]){
				//如“双色球”
				lot = i;
				lotname = C.Config.lotteryTypeHash[i];
			}
		}
	%>
	<% if(lotteryType == 21) { %>
		<a href="reward/single-sport.html" data-param="lotype=<%= lotteryType %>" rel="<%= lot %>"> 
			<span class="icon"></span>
			<div class="txt">
				<p class="onlyone">
					<em class="lotname"><%= lotname %></em>
				 	<% if (typeof issue !== 'undefined') { %>第<em class="issueCount"><%= issue %></em>期<% } %>
				</p>
			</div>
			<s></s>
		</a>
	<% }else { %>
	
    <a href="reward/single.html" data-param="lotype=<%= lotteryType %>" rel="<%= lot %>">
        <span class="icon"></span>
        <div class="txt">
            <p><em class="lotname"><%= lotname %></em> 第<em class="issueCount"><%= issue %></em>期</p>
            <p class="ball">
            	<%
            		//双色球、七乐彩
            		if(lotteryType == 1 || lotteryType == 7){
            			var lucky = luckyNum.split(':');
            			print(lucky[0].replace(/(\d{2})/gi,'<em>$1</em>') + lucky[1].replace(/(\d{2})/gi,'<span>$1</span>'));
            		}else if(lotteryType == 8){   
            			//大乐透
            			var lucky = luckyNum.split('-');
            			print(lucky[0].replace(/(\d{2})/gi,'<em>$1</em>') + lucky[1].replace(/(\d{2})/gi,'<span>$1</span>'));
            		}else if(lotteryType == 22){   
            			//十五选五
            			print(luckyNum.replace(/(\d{2})/gi,'<em>$1</em>'));
            		}else if(lotteryType == 15){
            			//十一运夺金
            			print(luckyNum.replace(/(\d{2})(,?)/gi,'<em>$1</em>'));
            		}else{
            			//福彩3d、排列三、排列五、七星彩、新时时彩
            			print(luckyNum.replace(/,/gi,'').replace(/(\d{1})/gi,'<em>$1</em>'));
            		}
            	%>
            </p>
        </div>
        <s></s>
    </a>
    <% }%>
</script>

<script>
	KISSY.use('mobile/app/1.2/demo/lottery/js/reward/all' , function(S , all) {
		all.initialize();
	});
</script>
